package example.controller;


import example.dao.ConnectionMysql;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/home")
public class DemoController {
    @RequestMapping(value = "/info",produces = "text/plain;charset=utf-8")
    @ResponseBody
    public String info(){
        System.out.println("info");
//        String info="# ---------------------------------------- \n" +
//                "# highcharts.com\n" +
//                "# Audience Overview\n" +
//                "# 20130309-20130408\n" +
//                "# ----------------------------------------\n" +
//                "Day,访问用户（UV）,温度（TV）\n" +
//                "3/9/13 ,4346 ,4234\n" +
//                "3/10/13,4112 ,1234\n" +
//                "3/11/13,11356,8234\n" +
//                "3/12/13,11876,5234\n" +
//                "3/13/13,11966,5234\n" +
//                "3/14/13,12086,6234\n" +
//                "3/15/13,10916\n" +
//                "3/16/13,4507\n" +
//                "3/17/13,4202\n" +
//                "3/18/13,11523\n" +
//                "3/19/13,14431\n" +
//                "3/20/13,12599\n" +
//                "3/21/13,13094\n" +
//                "3/22/13,13234\n" +
//                "3/23/13,5213\n" +
//                "3/24/13,4806\n" +
//                "3/25/13,12639\n" +
//                "3/26/13,12768\n" +
//                "4/8/13,16068";

//
//        String info="# ---------------------------------------- \n" +
//                "# highcharts.com\n" +
//                "# Audience Overview\n" +
//                "# 20130309-20130408\n" +
//                "# ----------------------------------------\n" +
//                "Day,温度（TMP）\n";
        int tmp=ConnectionMysql.getOne();
        System.out.println(">>>>>>>>>>>>>>>>");
        System.out.println(tmp);
        System.out.println("<<<<<<<<<<<<<<<<");
        return String.valueOf(tmp);
    }

    @RequestMapping("/index")
    public String index(){
        return "index";
    }

}
